using Azure.Web.Models;
using Xunit;

namespace Azure.Tests.Web.ViewModels
{
    public class EditPostViewModelFacts
    {
        [Fact]
        public void ViewModelIsConstructedWithPostProperly()
        {
            var post = Test.Post;

            var viewModel = new EditPostViewModel(post);

            Assert.Equal(post.PartitionKey, viewModel.PartitionKey);
            Assert.Equal(post.RowKey, viewModel.RowKey);
            Assert.Equal(post.Slug, viewModel.Slug);
            Assert.Equal(post.Title, viewModel.Title);
            Assert.Equal(post.Body, viewModel.Body);
        }
    }
}